package com.lu;

import java.lang.reflect.Field;

public class ArrayFind {
	public static void main(String[] args) {
		boolean found = false;
		try {
			Class<?> class1 = Class.forName(args[0]);
			Field[] fields = class1.getDeclaredFields();
			for (Field field : fields) {
				Class<?> c = field.getType();
				if (c.isArray()) {
					found = true;
					System.out.format("%s%n" + "  Field:%s%n" + "  type:%s%n" + "  component type:%s%n", field,
							field.getName(), c, c.getComponentType());

				}
			}
			if (!found) {
				System.out.format("No array fields%n");
			}
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}

}
